<template>
  <div class="view-wrapper">
    <div class="merchantsId">商家编号：{{this.id}}-{{name}}</div>
    <div class="view-inner-wrap">
      <el-tabs v-model="activeName">
        <el-tab-pane label="基本资料" name="first">
          <div class="tabs-body">
            <information  />
          </div>
        </el-tab-pane>
        <el-tab-pane label="预付卡报备" name="third">
          <div class="tabs-body">
            <assets-detail />
          </div>
        </el-tab-pane>
     
      </el-tabs>
    </div>
  </div>
</template>
<script>
// components
import Information from './components/information/index'
import AssetsDetail from './components/assetsDetail/index'
export default {
  name: 'CreditDetail',
  components: {
    Information,
    AssetsDetail,
  },
  provide() {
    const { id } = this.$route.query
    return {
      merchantId: id
    }
  },
  data() {
    return {
      activeName: 'first',
      id: '',
      assetId: '',
      name:'',
    }
  },
  created() {
    const { id } = this.$route.query
    this.id = id
    
  },
  mounted(){
    let query = this.$route.query;
    console.log(query)
    if(query.name){
      this.name = query.name
    }
    if(query.activeName){
      this.activeName = query.activeName
    }else{
      this.activeName = 'first'
    }
    
  },
  methods: {
    // 获取资产ID
   
  }
}
</script>
<style lang="scss" scoped>
  .merchantsId{
    color: #303133;
    font-size: 15px;
    margin-bottom: 16px;
  }
</style>
